﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using FFTConv;
using SVM;

namespace GaborRec
{
    public class GaborRecognize
    {
        GaborEmguSVMTest test = new GaborEmguSVMTest();
        public GaborRecognize()
        {
        }
        public void Train()
        {
            test.Train();
        }
        public void Train(string sampledirectory)
        {
            test.Train(sampledirectory);
        }
        public void Train(string[] sampledirs)
        {
            test.Train(sampledirs);
        }
        public char  Recognize(Bitmap bmp)
        {
            return test.SVMtest(bmp);
            //int category = (int)test.SVMtest(bmp);
            //switch (category)
            //{
            //    case 1: return '1';
            //    case 2: return '2';
            //    case 3: return '3';
            //    case 4: return '4';
            //    case 5: return '5';
            //    case 6: return '6';
            //    case 7: return '7';
            //    case 8: return '8';
            //    case 9: return '9';
            //    case 10: return '0';
            //    case 11: return '皖';
            //    case 12: return 'A';
            //    case 13: return 'M';
            //    case 14: return 'C';
            //    default:
            //        throw new Exception("Invalide!");
            //}
        }
      
    }
}
 